﻿Type=Activity
Version=6
ModulesStructureVersion=1
B4A=true
@EndOfDesignText@
#Region  Activity Attributes 
	#FullScreen: False
	#IncludeTitle: True
#End Region

Sub Process_Globals
	'These global variables will be declared once when the application starts.
	'These variables can be accessed from all modules.

End Sub

Sub Globals
	'These global variables will be redeclared each time the activity is created.
	'These variables can only be accessed from this module.
	Private btnleft As Label
	Private edtfeedbackcontent As EditText
	Private edtlxfs As EditText
End Sub

Sub Activity_Create(FirstTime As Boolean)
Dim telaw As telanywhere
telaw.Initialize(Activity)

	'Do not forget to load the layout file created with the visual designer. For example:
	Activity.LoadLayout("layfeedback")
	comm.SetEdtStyle(Activity,False)
	comm.setFA(btnleft,"fa-angle-left","")
	If g_store.conf.GetDefault("islogin",False) Then '如果已经登陆，自动填写手机号
		Dim mi As myInfo=g_store.conf.Get("myinfo")
		If mi.usertel.Length>4 Then edtlxfs.Text=mi.usertel
	End If
End Sub

Sub Activity_Resume

End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub


Sub ivback_Click
	Activity.Finish
End Sub
Sub JobDone(thj As HttpJob)
	ProgressDialogHide
	If thj.Success Then
		Dim str As String=thj.GetString
		Dim nr As netRes=ParseHelper.getStatusData(str)
		If nr.nCode=200 Then
			Select thj.JobName
			Case "feedbc"
					comm.T("提交成功")
					Activity.Finish
			End Select
		Else
			comm.TL(thj.JobName&"错误:"&nr.sData)
		End If
	Else
		comm.TL("网络错误:"&thj.JobName&" "&thj.ErrorMessage)
	End If
End Sub
Sub btnsubmit_Click
	If edtlxfs.Text.Trim.Length>0 And edtfeedbackcontent.Text.Trim.Length>0 Then
		'Dim content As String=comm.urlencode(edtfeedbackcontent.Text.Trim)
		Dim content As String=edtfeedbackcontent.Text.Trim
		comm.showProgress("正在提交")
		ParseHelper.doPostReqArr(Me,"feedbc",comm.getApi(comm.apiIdx.FEEDBACK),Array As String("usertel",edtlxfs.Text.Trim,"content",content),"")
	Else
		comm.T("联系方式和反馈内容不能为空！")
	End If
End Sub